UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+8eQbWKxjR7NujurqO/7ErPmAxnwTi3FvKVYakphgNg='
WHERE
key_id = '7339c9cd1f393cef59ad85a1b09002d0a3661d23adfed72e196e0b3f8ba4c18d'
AND (
token = '+8eQbWKxjR7NujurqO/7ErPmAxnwTi3FvKVYakphgNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)