UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mfH6effRbVOG4L7J/cb4OskYv4GUhF7bZ4HqZxv/vR8='
WHERE
key_id = '7236f70b96a183c90ccc74717e43fcb30636e5dc69f3653ab1a46131c964f214'
AND (
token = 'mfH6effRbVOG4L7J/cb4OskYv4GUhF7bZ4HqZxv/vR8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)