UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ea02k6bZVJ5FNtN1nEHfi1JPtp/jJwihBf1cBr0gPN8='
WHERE
key_id = '7925178b6b2fbc1fa662f341e45cddddb2611a54d622c4dd78930af64f9bbce9'
AND (
token = 'ea02k6bZVJ5FNtN1nEHfi1JPtp/jJwihBf1cBr0gPN8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)