UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zqvA/Jsd/j2FcQrMsJwcQi1KAB+XlrqDdqh/GqCq0v8='
WHERE
key_id = 'a4bf832c5a059f811a2eb9e0dfaaccdd93c12c5e5ea0e0ac0e4c96578ff7100a'
AND (
token = 'zqvA/Jsd/j2FcQrMsJwcQi1KAB+XlrqDdqh/GqCq0v8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)