UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nxRibAyRenCVx4cDLtSjobMA2wZDdNbhh+84TEfl5Nc='
WHERE
key_id = '53809b229928fc67b017fa1a5559dab1b941c6e076b5eaa2af20ee26d8b152db'
AND (
token = 'nxRibAyRenCVx4cDLtSjobMA2wZDdNbhh+84TEfl5Nc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)