UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rnedHEperNsRouPsXQHS9xS51tKIRg8kg4Qm10WL6M4='
WHERE
key_id = 'e990da2608783467945a8d529a185fbc1699abc40ee68a59c453cda467ccc25b'
AND (
token = 'rnedHEperNsRouPsXQHS9xS51tKIRg8kg4Qm10WL6M4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)