UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UHv4BM72FYWhEhBdbY35N1Tqx+h+It/Ymo3aaqkTrw0='
WHERE
key_id = '35de66dde8484d168c62d452d97b8c67a33d8725dc431c98d61fc46bae9329d7'
AND (
token = 'UHv4BM72FYWhEhBdbY35N1Tqx+h+It/Ymo3aaqkTrw0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)