UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7KBNexLumLpG79NSQ/FAH5LOoe+hc8H3k/nfwgb7nuA='
WHERE
key_id = '59bbe7bed15c8beec875dbe02a773744d08793911fad9afe35e5a59408989547'
AND (
token = '7KBNexLumLpG79NSQ/FAH5LOoe+hc8H3k/nfwgb7nuA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)