UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oglKC/O4W0U8Et8tStGy52AH4xUSYxWkPOSp3GMjVHE='
WHERE
key_id = '32153f84f1b6289197d89cd61168a5140324d75e0538c13f556cc44cbfb26ae7'
AND (
token = 'oglKC/O4W0U8Et8tStGy52AH4xUSYxWkPOSp3GMjVHE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)