UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UaMWfo4HYEqp45f4nXyvB+zYHPKQ5oQlIz/qufm6MzE='
WHERE
key_id = '7d1b686eac2d58d186a17825ff6311e515bc2ec92dbca10cdc2758535c3e0c9f'
AND (
token = 'UaMWfo4HYEqp45f4nXyvB+zYHPKQ5oQlIz/qufm6MzE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)