UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tZmwTdMurDgR8xysl3LFD03Qc01PrEkpYAP93LjPduw='
WHERE
key_id = '44c4b4a8032d2fd2505eb51daf3f29f48a2be6ba02aeb3dd41e37fa3311c5954'
AND (
token = 'tZmwTdMurDgR8xysl3LFD03Qc01PrEkpYAP93LjPduw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)