UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e/kenDROROoeawzXeQNxNeXsqwC/QfVi6+DmIQ9DUsw='
WHERE
key_id = 'f3f960816fc3396c2fd2e928aa388d9eddc10284fd3f061f72e0e527d6deec7b'
AND (
token = 'e/kenDROROoeawzXeQNxNeXsqwC/QfVi6+DmIQ9DUsw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)