UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'AkoCecB38/MY2mSiCEKTEAPXFQRG35dFo1ysm3AifFs='
WHERE
key_id = '93ffa512d87ee2ba9c09f26d81a53db532787e26a34b0af47bbc2c2199d5e106'
AND (
token = 'AkoCecB38/MY2mSiCEKTEAPXFQRG35dFo1ysm3AifFs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)