UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IhEyhIQSHkMzfXE5cir9fENZLZVt9jnP+84iIOFljxM='
WHERE
key_id = '58a8694d4d6352a2d5e762d9a0ddd07df60af00e98b40884670e596eb346ea72'
AND (
token = 'IhEyhIQSHkMzfXE5cir9fENZLZVt9jnP+84iIOFljxM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)