UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V/furSYRQldNBjUE5gWOej3H1rpTd1PouVZPHNa/7ac='
WHERE
key_id = '089339affaafcbd97dbe8f493938fd62614ab18958347327abb51776610227c7'
AND (
token = 'V/furSYRQldNBjUE5gWOej3H1rpTd1PouVZPHNa/7ac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)