UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ecfIot/9ZfY7XkL8DFSe8FN/PIZDT1PpWr0y1QtyFgI='
WHERE
key_id = '882e681e67c4af49a528d8df3bd600ccba7e1f8b3235b4ad2a0bfd21d818ff04'
AND (
token = 'ecfIot/9ZfY7XkL8DFSe8FN/PIZDT1PpWr0y1QtyFgI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)