UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3boC6jBR1v5/emmMgy3ckVa7FdA8tBb18K2s1sd2J0g='
WHERE
key_id = '6c150de0c9ffb97bd9353e87d05f1c31939f0e8bf0f5a75d74688193c5b930f3'
AND (
token = '3boC6jBR1v5/emmMgy3ckVa7FdA8tBb18K2s1sd2J0g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)