UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7eCj2h7VPh3UN7RujEO/zupH2YJSsy91JkljB0OFFkY='
WHERE
key_id = '891d207c6baf726c8a0a99bd32b84c140e920217d0d029f92802d0ebcd9321b6'
AND (
token = '7eCj2h7VPh3UN7RujEO/zupH2YJSsy91JkljB0OFFkY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)