UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '26neh/uJKaZjto8Cgze6PRRRA2FxWTnz4qIy4VI9EbM='
WHERE
key_id = '2ed2de6ec7084147c11061c98bb80242890731e054649fd61a5d953c06ad0d81'
AND (
token = '26neh/uJKaZjto8Cgze6PRRRA2FxWTnz4qIy4VI9EbM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)