UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1p1CnxBF2AvYZdYHKEc3aiff6NOKyUkTk/UTG2KVgZ8='
WHERE
key_id = '3e816fb0171ac2fa23bd6db7e601d2f4b0ce1c4d81336d82b36a453402b1ad60'
AND (
token = '1p1CnxBF2AvYZdYHKEc3aiff6NOKyUkTk/UTG2KVgZ8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)