UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oGL7z/493oPaclmaeTQkh2NeVRFiwLfOmr65XJBJhwE='
WHERE
key_id = '0dbda16b2fb3537e3febddda337cce5a9e35dcec18689b6df1a32082feb532c8'
AND (
token = 'oGL7z/493oPaclmaeTQkh2NeVRFiwLfOmr65XJBJhwE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)