UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '94+/D90HOlcTsuwOl1EPjMFe26wTkBvnCBnPhMbIjhg='
WHERE
key_id = '86fd0ec5f947ed128a0f36aed8d893a1f9bcc923607017118b6aa9f9421dab1d'
AND (
token = '94+/D90HOlcTsuwOl1EPjMFe26wTkBvnCBnPhMbIjhg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)