UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RD/JeIbiToUnyzDj79OPmclX5kMu7AvVxgwSnQ/zE+A='
WHERE
key_id = '95da26d756c813b6f6b5edc69e3a880e1f69d4fa1dfd50c9c1002950c5e19739'
AND (
token = 'RD/JeIbiToUnyzDj79OPmclX5kMu7AvVxgwSnQ/zE+A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)