UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wyQ81NYU+bpcb3O3rOwZK6pGfPX9KBrbT4qyjk/tH4k='
WHERE
key_id = '7b55e2f384bb6541c55bd6e303ecbc25a17ce9c7749ccf643c83a5498f9811cb'
AND (
token = 'wyQ81NYU+bpcb3O3rOwZK6pGfPX9KBrbT4qyjk/tH4k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)