UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/QAf2Dsz64J2lKoZmRpX8RGw/SKnL2917ZQjxbNextc='
WHERE
key_id = '8a0319302b5e5f60ed36b1486e26aa40b555c102fec84e2811f72db213593b50'
AND (
token = '/QAf2Dsz64J2lKoZmRpX8RGw/SKnL2917ZQjxbNextc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)