UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+zMcRUlB6ak8/TD40M1/44Tab3l90vQHVSMp/Bbmw14='
WHERE
key_id = '6ab1485372c93a1c1f5b65b0642b34ef3c4cded1adc1a9179388aa33f5bef77f'
AND (
token = '+zMcRUlB6ak8/TD40M1/44Tab3l90vQHVSMp/Bbmw14='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)