UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's0Qg4i1+nA/uS3vsFdKwwL56hB+ZM+ewV83Y8nqOQVQ='
WHERE
key_id = '2bf2767028efacfb5450230d18bb1581b301d236b20061f40b3fa411b47388bd'
AND (
token = 's0Qg4i1+nA/uS3vsFdKwwL56hB+ZM+ewV83Y8nqOQVQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)