UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'b5qhg6eBRV3g8fBok9wZWJJngZDfFvodPTow/LVNgQs='
WHERE
key_id = '6d75d0a37e3e1a84ad6903d0e061133247c747ef90a1eef421f82ba9a7acfe88'
AND (
token = 'b5qhg6eBRV3g8fBok9wZWJJngZDfFvodPTow/LVNgQs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)