UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eix/+o+L27iSad6yl4/O4DIap1mfrjYw1L+uxEtumZU='
WHERE
key_id = 'bc1d96e08e355a539114f4d0e292e2abc05e56f82f5722bd1f83c350e6283a06'
AND (
token = 'eix/+o+L27iSad6yl4/O4DIap1mfrjYw1L+uxEtumZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)