UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1tmtJPEbyXriBfafsovldMJ4hmWpXBW5UDpGLBVevpQ='
WHERE
key_id = '5b47d5a1d74ab3e70906fd130d5a52940cdc654b20282a2b6831f9974f4e1b88'
AND (
token = '1tmtJPEbyXriBfafsovldMJ4hmWpXBW5UDpGLBVevpQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)