UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'e0xT/PNDKHC4cK+emqhOCKOZyi8BclCFz3pe1UQKuBs='
WHERE
key_id = '7349d25c2da609f5fd974cba488328b3697a1fed4050231fb07b84bdbc0902e6'
AND (
token = 'e0xT/PNDKHC4cK+emqhOCKOZyi8BclCFz3pe1UQKuBs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)