UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LV1Ef89/E+Vv6E2+Ip8pUYk2PXtllWBsvFYC5b/OM9Y='
WHERE
key_id = '341178d4ca3f015bba13184ee564106fdec2cd446d76d2bd7d98b026323dad8b'
AND (
token = 'LV1Ef89/E+Vv6E2+Ip8pUYk2PXtllWBsvFYC5b/OM9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)